﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输入框Input</title>
</head>
<body>
    我是张三
    <form>
        <table>
            <tr>
                <td>
                    账号
                </td>
                <td>
                    placeholder: 用于输入框的提示信息
                    <br>
                    autofocus: 页面加载完毕后，控件自动获得焦点
                    <br>
                    pattern: 由浏览器根据正则表达式自动校验输入的内容<br>
                    <input autofocus pattern="\d{11}" type="text" placeholder="账号（只能是手机号）" name="username" id="username" required>
                    <label for="" style="color: red;">*</label> 请输入11位手机号
                    <input type="hidden" name="userid" value="12344">
                </td>
            </tr>
            <tr>
                <td>
                    <label for="nickname_label">
                        昵称
                    </label>
                </td>
                <td>
                    readonly\disabled: 都可以实现不允许用户修改内容，但是显示的样式稍有不同
                    <br>
                    <input type="text" name="nickname" id="nickname_label" value="nickname2024">
                    <br>
                    <input type="text" readonly name="nickname" id="nickname" value="nickname2024">
                    <br>
                    <input type="text" disabled name="nickname1" id="nickname1" value="nickname2024">

                </td>
            </tr>
            <tr>
                <td>
                    密码
                </td>
                <td>
                    <input type="password" name="userpwd" id="userpwd" required>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit">
                </td>
            </tr>
        </table>
    </form>
我是李四
</body>
</html>